<?php

namespace App\Providers;

use App\Repositories\CaptchaRepository;
use App\Repositories\RiakRepository;
use Illuminate\Support\ServiceProvider;

class RiakServiceProvider extends ServiceProvider
{

    /**
     * 标记服务提供者是否延迟加载
     *
     * @var bool
     */
    protected $defer = true;
    /**
     * Bootstrap the application services.
     *
     * @return void
     */
    public function boot()
    {
        //
    }

    /**
     * Register the application services.
     *
     * @return void
     */
    public function register()
    {
        $this->app->singleton(RiakRepository::class, function ($app) {
            return new RiakRepository();
        });
    }


    /**
     * 获取由提供者提供的服务
     *
     * @return array
     */
    public function provides()
    {
        return [CaptchaRepository::class];
    }

}
